Code
import nasem_dairy as nd # assumes locally installed with `poetry` or from pip git+...
import pandas as pdThis is a recreation of some of Braeden’s work to calculate ME and MP requirements for individual cows, every day or week.
Key changes:
uses nasem_dairy package
avoids using a database, just keeps dataframes in memory
simplified functions and adjusted to work with the current versions of functions that calculate ME and MP requirements
It still works by using a diet_date key to link the diet and animal tables.
TODO: replicate using full model for easier calculation of other things such as ME intake.
import nasem_dairy as nd # assumes locally installed with `poetry` or from pip git+...
import pandas as pdimport plotly.express as px
import plotly.io as pio
# This ensures Plotly output works in multiple places:
# plotly_mimetype: VS Code notebook UI
# notebook: "Jupyter: Export to HTML" command in VS Code
# See https://plotly.com/python/renderers/#multiple-renderers
pio.renderers.default = "plotly_mimetype+notebook"
# pio.renderers# import importlib
# nd = importlib.reload(nd)diet_info, animal_input, equation_selection = nd.read_input('../src/nasem_dairy/data/input.txt')diet_info| Feedstuff | %_DM_user | |
|---|---|---|
| Index | ||
| Alfalfa meal | Alfalfa meal | 16.30 |
| Canola meal | Canola meal | 10.20 |
| Corn silage, typical | Corn silage, typical | 40.00 |
| Barley grain, dry, ground | Barley grain, dry, ground | 16.32 |
| Pasture, grass | Pasture, grass | 15.00 |
animal_input{'An_Parity_rl': 2.0,
'Trg_MilkProd': 35.0,
'An_BW': 700.0,
'An_BCS': 3.0,
'An_LactDay': 150.0,
'Trg_MilkFatp': 3.8,
'Trg_MilkTPp': 3.1,
'Trg_MilkLacp': 4.85,
'DMI': 24.521,
'An_BW_mature': 700.0,
'Trg_FrmGain': 0.19,
'An_GestDay': 46.0,
'An_GestLength': 280.0,
'Trg_RsrvGain': 0.0,
'Fet_BWbrth': 44.1,
'An_AgeDay': 1620.0,
'An_305RHA_MlkTP': 280.0}
equation_selection{'Use_DNDF_IV': 0, 'DMI_pred': 1}
This file was put together roughly from Elora. Each row is a cow’s measured performance as well as the combined TMR nutrient analysis of what she was likely eating. It is used to estimate MP and ME requirements of individuals.
# Create dataframe with test data
input_data = pd.read_parquet('./test_files/merged_cow_with_feed_daily_20230530_1557.parquet')
# Remove animals missing diet information
input_data_dropna = input_data.dropna(subset=['sampleId'])
input_data.info()<class 'pandas.core.frame.DataFrame'>
RangeIndex: 17599 entries, 0 to 17598
Data columns (total 49 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 cow_id 17599 non-null int64
1 lactation_number 17599 non-null int64
2 date 17599 non-null datetime64[ns]
3 days_in_milk 17599 non-null float64
4 MY 17599 non-null float64
5 weight 17599 non-null float64
6 BW_smooth 17599 non-null float64
7 BW_gain 17599 non-null float64
8 asfed_intake 17599 non-null float64
9 DMI 17599 non-null float64
10 bcs_value 6377 non-null float64
11 Birth Date 15891 non-null datetime64[ns]
12 Test Day Date 15891 non-null datetime64[ns]
13 Lact Start Date 15891 non-null datetime64[ns]
14 Fat % 15891 non-null float64
15 Protein % 15891 non-null float64
16 SCC 15891 non-null float64
17 Pregnancy Indicator 15891 non-null object
18 Days to Last Breeding 15891 non-null float64
19 days_preg 15891 non-null float64
20 conception_date 3779 non-null datetime64[ns]
21 age_m 15891 non-null float64
22 sampleId 15941 non-null object
23 reportDate 15941 non-null datetime64[ns]
24 location 15941 non-null object
25 Acid Detergent Fibre (%) 15941 non-null float64
26 Ash (%) 15941 non-null float64
27 Calcium (%) 15941 non-null float64
28 Copper (ug/g) 15941 non-null float64
29 Crude Fat (%) 15941 non-null float64
30 Crude Protein (%) 15941 non-null float64
31 Dry Matter (%) 15941 non-null float64
32 Iron (ug/g) 15941 non-null float64
33 Magnesium (%) 15941 non-null float64
34 Manganese (ug/g) 15941 non-null float64
35 Moisture (%) 15941 non-null float64
36 NE Gain (MCal/Kg) 15941 non-null float64
37 NE Lactation (MCal/Kg) 15941 non-null float64
38 NE Maintenance (MCal/Kg) 15941 non-null float64
39 NFC (%) 15941 non-null float64
40 Neutral Detergent Fibre (%) 15941 non-null float64
41 Phosphorus (%) 15941 non-null float64
42 Potassium (%) 15941 non-null float64
43 Sodium (%) 15941 non-null float64
44 Starch (%) 15941 non-null float64
45 Sulphur (%) 15941 non-null float64
46 Total Digestible Nutrients (%) 15941 non-null float64
47 Zinc (ug/g) 15941 non-null float64
48 DIM_bins_w 17599 non-null category
dtypes: category(1), datetime64[ns](6), float64(37), int64(2), object(3)
memory usage: 6.5+ MB
# Cleaning Data: Step 1
# Move diet information to the database and replace with unique Diet_ID
def get_diets(df):
'''
This assumes an input df with weekly or daily entries of cow data + diet data. This function extracts the diet component,
adding a key that will be linked to the animal data
df: The output from combine_dairy_data_python/dev/dev_format_feed_quality
'''
current_diets = df.assign(
Diet_ID = lambda df: df['sampleId'] + '_' + df['reportDate'].dt.strftime('%Y-%m-%d')
).drop(
columns = ['lactation_number', 'days_in_milk', 'MY', 'weight', 'BW_smooth', 'BW_gain', 'asfed_intake', 'DMI', 'bcs_value', 'Birth Date', 'Test Day Date',
'Lact Start Date', 'Fat %', 'Protein %', 'SCC', 'Pregnancy Indicator', 'Days to Last Breeding', 'days_preg', 'conception_date', 'age_m', 'cow_id', 'date', 'DIM_bins_w']
).drop_duplicates(
subset = ['sampleId', 'reportDate'],
keep = 'first'
)
return current_diets
current_diets = get_diets(input_data_dropna)
current_diets| sampleId | reportDate | location | Acid Detergent Fibre (%) | Ash (%) | Calcium (%) | Copper (ug/g) | Crude Fat (%) | Crude Protein (%) | Dry Matter (%) | ... | NFC (%) | Neutral Detergent Fibre (%) | Phosphorus (%) | Potassium (%) | Sodium (%) | Starch (%) | Sulphur (%) | Total Digestible Nutrients (%) | Zinc (ug/g) | Diet_ID | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1658 | DAIRY - LACTATING TMR | 2021-01-25 | parlour | 21.23 | 6.56 | 0.77 | 12.38 | 3.08 | 14.63 | 47.34 | ... | 43.59 | 30.28 | 0.37 | 1.19 | 0.32 | 25.88 | 0.13 | 72.36 | 61.85 | DAIRY - LACTATING TMR_2021-01-25 |
| 2290 | DAIRY-LACTATING TMR | 2021-02-04 | parlour | 21.12 | 6.48 | 0.79 | 13.88 | 3.12 | 14.20 | 46.93 | ... | 41.28 | 33.02 | 0.46 | 1.46 | 0.38 | 27.17 | 0.15 | 72.45 | 102.66 | DAIRY-LACTATING TMR_2021-02-04 |
| 4039 | DARIRY LACTATING TMR | 2021-03-05 | parlour | 19.68 | 5.92 | 0.79 | 14.81 | 3.30 | 14.01 | 45.79 | ... | 41.04 | 33.45 | 0.42 | 1.39 | 0.31 | 28.60 | 0.14 | 73.57 | 97.36 | DARIRY LACTATING TMR_2021-03-05 |
| 5807 | DAIRY NON RUMENSIN LACTATING TMR | 2021-04-08 | parlour | 23.00 | 6.43 | 0.86 | 12.37 | 3.39 | 17.86 | 44.95 | ... | 38.85 | 31.79 | 0.46 | 1.54 | 0.32 | 22.63 | 0.18 | 70.98 | 116.44 | DAIRY NON RUMENSIN LACTATING TMR_2021-04-08 |
| 7063 | DAIRY LACTATING TMR | 2021-05-06 | parlour | 22.01 | 6.67 | 0.86 | 12.85 | 3.22 | 16.17 | 47.82 | ... | 40.51 | 31.82 | 0.41 | 1.32 | 0.39 | 25.08 | 0.17 | 71.75 | 104.39 | DAIRY LACTATING TMR_2021-05-06 |
| 8811 | NON RUM LACT TMR-DAIRY | 2021-06-04 | parlour | 19.97 | 6.38 | 0.77 | 14.90 | 3.18 | 14.10 | 47.39 | ... | 44.79 | 29.61 | 0.38 | 1.34 | 0.39 | 22.79 | 0.14 | 73.34 | 85.10 | NON RUM LACT TMR-DAIRY_2021-06-04 |
| 10236 | LACTATING TMR-DAIRY | 2021-07-02 | parlour | 22.12 | 6.63 | 1.03 | 16.08 | 3.12 | 14.89 | 47.23 | ... | 43.84 | 29.77 | 0.47 | 1.48 | 0.41 | 23.92 | 0.19 | 71.67 | 99.75 | LACTATING TMR-DAIRY_2021-07-02 |
| 12108 | DAIRY LACTATING TMR | 2021-08-06 | parlour | 20.16 | 6.75 | 0.78 | 16.37 | 3.44 | 15.51 | 49.65 | ... | 44.74 | 28.25 | 0.36 | 1.35 | 0.38 | 24.17 | 0.18 | 73.20 | 107.76 | DAIRY LACTATING TMR_2021-08-06 |
| 13628 | DAIRY LACTATING TMR | 2021-09-03 | parlour | 21.48 | 7.05 | 0.86 | 14.69 | 3.75 | 15.12 | 44.47 | ... | 42.24 | 31.14 | 0.47 | 1.41 | 0.29 | 23.52 | 0.19 | 72.17 | 114.80 | DAIRY LACTATING TMR_2021-09-03 |
| 14339 | DAIRY LACTATING TMR | 2021-10-12 | parlour | 21.02 | 6.75 | 0.96 | 15.07 | 2.68 | 15.75 | 47.36 | ... | 41.78 | 30.97 | 0.42 | 1.22 | 0.34 | 22.64 | 0.18 | 72.53 | 86.65 | DAIRY LACTATING TMR_2021-10-12 |
| 14764 | DAIRY LACTATING TMR | 2021-11-09 | parlour | 22.01 | 6.78 | 0.95 | 23.52 | 3.20 | 18.40 | 46.07 | ... | 39.59 | 30.51 | 0.42 | 1.46 | 0.33 | 31.29 | 0.23 | 71.75 | 150.05 | DAIRY LACTATING TMR_2021-11-09 |
| 16404 | DAIRY LACTATING TMR | 2021-12-10 | parlour | 21.96 | 7.28 | 0.93 | 17.54 | 3.26 | 15.21 | 46.16 | ... | 43.41 | 29.88 | 0.40 | 1.76 | 0.41 | 21.65 | 0.26 | 71.79 | 119.15 | DAIRY LACTATING TMR_2021-12-10 |
12 rows × 27 columns
def clean_animal_inputs(df):
'''
This assumes an input df with weekly or daily entries of cow data + diet data.
This function extracts the animal component,
adding a key that will be linked to the diet data
df: The output from combine_dairy_data_python/dev/dev_format_feed_quality
'''
# Rename existing columns
# From farm names to names that match those required downstream
df = df.rename(columns={
'lactation_number': 'An_Parity_rl',
'days_in_milk': 'An_LactDay',
'MY': 'Trg_MilkProd',
'BW_smooth': 'An_BW',
# 'DMI': 'Dt_DMIn', # downstream & execute_model.py use 'DMI'
'Fat %': 'Trg_MilkFatp',
'Protein %': 'Trg_MilkTPp',
'days_preg': 'An_GestDay'
})
# Add default values and drop columns we don't need
clean_data = df.assign(
An_BW_mature = 700,
Trg_FrmGain = 0,
An_GestLength = 280,
Fet_BWbrth = 44.1,
Trg_MilkLacp = 4.85,
Trg_RsrvGain = 0,
An_AgeDay = lambda x: x['age_m'] * 30.436875,
# add NDF intake (before dropping animal columns from df)
Dt_NDFIn = lambda df: df['Neutral Detergent Fibre (%)']/100 * df['DMI']
).drop(
columns = ['location', 'Acid Detergent Fibre (%)', 'Ash (%)', 'Calcium (%)', 'Copper (ug/g)', 'Crude Fat (%)', 'Crude Protein (%)', 'Dry Matter (%)', 'Iron (ug/g)', 'Magnesium (%)', 'Manganese (ug/g)', 'Moisture (%)', 'NE Gain (MCal/Kg)', 'NE Lactation (MCal/Kg)', 'NE Maintenance (MCal/Kg)', 'NFC (%)', 'Neutral Detergent Fibre (%)', 'Phosphorus (%)', 'Potassium (%)', 'Sodium (%)', 'Starch (%)', 'Sulphur (%)', 'Total Digestible Nutrients (%)', 'Zinc (ug/g)', 'DIM_bins_w']
).assign(
# add key column to match diet data:
Diet_ID = lambda df: df['sampleId'] + '_' + df['reportDate'].dt.strftime('%Y-%m-%d')
)
return clean_data
animal_data = clean_animal_inputs(input_data_dropna)
print(animal_data.iloc[:, :6].head(2)) cow_id An_Parity_rl date An_LactDay Trg_MilkProd weight
1658 4921 1 2021-01-25 140.0 27.81 663.0
1659 4823 2 2021-01-25 72.0 31.97 734.0
animal_data.info()<class 'pandas.core.frame.DataFrame'>
Index: 15941 entries, 1658 to 17598
Data columns (total 33 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 cow_id 15941 non-null int64
1 An_Parity_rl 15941 non-null int64
2 date 15941 non-null datetime64[ns]
3 An_LactDay 15941 non-null float64
4 Trg_MilkProd 15941 non-null float64
5 weight 15941 non-null float64
6 An_BW 15941 non-null float64
7 BW_gain 15941 non-null float64
8 asfed_intake 15941 non-null float64
9 DMI 15941 non-null float64
10 bcs_value 4759 non-null float64
11 Birth Date 14681 non-null datetime64[ns]
12 Test Day Date 14681 non-null datetime64[ns]
13 Lact Start Date 14681 non-null datetime64[ns]
14 Trg_MilkFatp 14681 non-null float64
15 Trg_MilkTPp 14681 non-null float64
16 SCC 14681 non-null float64
17 Pregnancy Indicator 14681 non-null object
18 Days to Last Breeding 14681 non-null float64
19 An_GestDay 14681 non-null float64
20 conception_date 3415 non-null datetime64[ns]
21 age_m 14681 non-null float64
22 sampleId 15941 non-null object
23 reportDate 15941 non-null datetime64[ns]
24 An_BW_mature 15941 non-null int64
25 Trg_FrmGain 15941 non-null int64
26 An_GestLength 15941 non-null int64
27 Fet_BWbrth 15941 non-null float64
28 Trg_MilkLacp 15941 non-null float64
29 Trg_RsrvGain 15941 non-null int64
30 An_AgeDay 14681 non-null float64
31 Dt_NDFIn 15941 non-null float64
32 Diet_ID 15941 non-null object
dtypes: datetime64[ns](6), float64(18), int64(6), object(3)
memory usage: 4.1+ MB
# combined code to calculate GrUter_BWgain, ME and MP requirements.
# In order to work it needed to use the df.apply method, but then multiple columns can still be assigned using .assign.
# Even though it's not ideal to run the apply inside each call to assign, it's still fairly clean to read.
calculated_df = animal_data.assign(
GrUter_BWgain = lambda df: df.apply( lambda x:
nd.calculate_GrUter_BWgain(
x['Fet_BWbrth'],
x['An_AgeDay'],
x['An_GestDay'],
x['An_GestLength'],
x['An_LactDay'],
x['An_Parity_rl'],
coeff_dict = nd.coeff_dict),
axis = 1 #row wise
),
ME_requirement = lambda df: df.apply( lambda x:
nd.calculate_ME_requirement(
x['An_BW'],
x['DMI'],
x['Trg_MilkProd'],
x['An_BW_mature'],
x['Trg_FrmGain'],
x['Trg_MilkFatp'],
x['Trg_MilkTPp'],
x['Trg_MilkLacp'],
x['Trg_RsrvGain'],
x['GrUter_BWgain'],
coeff_dict = nd.coeff_dict)[0], #Trg_MEuse
axis = 1
),
MP_requirement = lambda df: df.apply( lambda x:
nd.calculate_MP_requirement(
x['Dt_NDFIn'],
x['DMI'],
x['An_BW'],
x['An_BW_mature'],
x['Trg_FrmGain'],
x['Trg_RsrvGain'],
x['Trg_MilkProd'],
x['Trg_MilkTPp'],
x['GrUter_BWgain'],
coeff_dict = nd.coeff_dict)[0], #An_MPuse_g_Trg
axis = 1
)
)
# Check for cows missing data
def check_na_requirement(df):
columns_to_check = ['ME_requirement', 'MP_requirement']
check_na = df[columns_to_check].isna().any(axis=1)
cows_missing_data = df[check_na]
return cows_missing_data
cows_missing_data = check_na_requirement(calculated_df)
cows_missing_data| cow_id | An_Parity_rl | date | An_LactDay | Trg_MilkProd | weight | An_BW | BW_gain | asfed_intake | DMI | ... | An_GestLength | Fet_BWbrth | Trg_MilkLacp | Trg_RsrvGain | An_AgeDay | Dt_NDFIn | Diet_ID | GrUter_BWgain | ME_requirement | MP_requirement | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1678 | 4824 | 2 | 2021-01-25 | 9.0 | 50.34 | 756.0 | 761.967 | -1.854 | 39.6 | 17.820 | ... | 280 | 44.1 | 4.85 | 0 | NaN | 5.395896 | DAIRY - LACTATING TMR_2021-01-25 | 0.0 | NaN | NaN |
| 1694 | 4962 | 1 | 2021-01-25 | 14.0 | 30.81 | 556.0 | 549.603 | -1.854 | 31.4 | 14.130 | ... | 280 | 44.1 | 4.85 | 0 | NaN | 4.278564 | DAIRY - LACTATING TMR_2021-01-25 | 0.0 | NaN | NaN |
| 1703 | 4679 | 3 | 2021-01-25 | 17.0 | 48.46 | 822.0 | 828.111 | -0.308 | 40.8 | 18.360 | ... | 280 | 44.1 | 4.85 | 0 | NaN | 5.559408 | DAIRY - LACTATING TMR_2021-01-25 | 0.0 | NaN | NaN |
| 1708 | 4715 | 3 | 2021-01-25 | 13.0 | 31.00 | 626.0 | 636.165 | 1.984 | 44.8 | 20.160 | ... | 280 | 44.1 | 4.85 | 0 | NaN | 6.104448 | DAIRY - LACTATING TMR_2021-01-25 | 0.0 | NaN | NaN |
| 1728 | 4715 | 3 | 2021-01-26 | 14.0 | 30.83 | 640.0 | 638.095 | 1.971 | 29.2 | 13.140 | ... | 280 | 44.1 | 4.85 | 0 | NaN | 3.978792 | DAIRY - LACTATING TMR_2021-01-25 | 0.0 | NaN | NaN |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 17562 | 4794 | 3 | 2021-12-31 | 20.0 | 46.18 | 710.0 | 708.289 | -3.033 | 41.5 | 18.675 | ... | 280 | 44.1 | 4.85 | 0 | NaN | 5.580090 | DAIRY LACTATING TMR_2021-12-10 | 0.0 | NaN | NaN |
| 17573 | 4966 | 2 | 2021-12-31 | 24.0 | 35.23 | 635.0 | 619.042 | -2.705 | 42.9 | 19.305 | ... | 280 | 44.1 | 4.85 | 0 | NaN | 5.768334 | DAIRY LACTATING TMR_2021-12-10 | 0.0 | NaN | NaN |
| 17575 | 4967 | 2 | 2021-12-31 | 10.0 | 32.53 | 640.0 | 671.499 | -2.391 | 48.9 | 22.005 | ... | 280 | 44.1 | 4.85 | 0 | NaN | 6.575094 | DAIRY LACTATING TMR_2021-12-10 | 0.0 | NaN | NaN |
| 17578 | 4943 | 2 | 2021-12-31 | 23.0 | 25.01 | 801.0 | 779.264 | -1.451 | 44.6 | 20.070 | ... | 280 | 44.1 | 4.85 | 0 | NaN | 5.996916 | DAIRY LACTATING TMR_2021-12-10 | 0.0 | NaN | NaN |
| 17592 | 4711 | 4 | 2021-12-31 | 18.0 | 36.99 | 740.0 | 824.037 | -3.974 | 41.7 | 18.765 | ... | 280 | 44.1 | 4.85 | 0 | NaN | 5.606982 | DAIRY LACTATING TMR_2021-12-10 | 0.0 | NaN | NaN |
1260 rows × 36 columns
calculated_df_noNA = calculated_df.dropna(subset = ['ME_requirement', 'MP_requirement'])calculated_df_noNA.info()<class 'pandas.core.frame.DataFrame'>
Index: 14681 entries, 1658 to 17598
Data columns (total 36 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 cow_id 14681 non-null int64
1 An_Parity_rl 14681 non-null int64
2 date 14681 non-null datetime64[ns]
3 An_LactDay 14681 non-null float64
4 Trg_MilkProd 14681 non-null float64
5 weight 14681 non-null float64
6 An_BW 14681 non-null float64
7 BW_gain 14681 non-null float64
8 asfed_intake 14681 non-null float64
9 DMI 14681 non-null float64
10 bcs_value 4576 non-null float64
11 Birth Date 14681 non-null datetime64[ns]
12 Test Day Date 14681 non-null datetime64[ns]
13 Lact Start Date 14681 non-null datetime64[ns]
14 Trg_MilkFatp 14681 non-null float64
15 Trg_MilkTPp 14681 non-null float64
16 SCC 14681 non-null float64
17 Pregnancy Indicator 14681 non-null object
18 Days to Last Breeding 14681 non-null float64
19 An_GestDay 14681 non-null float64
20 conception_date 3415 non-null datetime64[ns]
21 age_m 14681 non-null float64
22 sampleId 14681 non-null object
23 reportDate 14681 non-null datetime64[ns]
24 An_BW_mature 14681 non-null int64
25 Trg_FrmGain 14681 non-null int64
26 An_GestLength 14681 non-null int64
27 Fet_BWbrth 14681 non-null float64
28 Trg_MilkLacp 14681 non-null float64
29 Trg_RsrvGain 14681 non-null int64
30 An_AgeDay 14681 non-null float64
31 Dt_NDFIn 14681 non-null float64
32 Diet_ID 14681 non-null object
33 GrUter_BWgain 14681 non-null float64
34 ME_requirement 14681 non-null float64
35 MP_requirement 14681 non-null float64
dtypes: datetime64[ns](6), float64(21), int64(6), object(3)
memory usage: 4.1+ MB
px.scatter(
calculated_df_noNA,
x='DMI', y='ME_requirement',
color='An_LactDay')px.scatter(
calculated_df_noNA,
x='An_LactDay', y='ME_requirement',
color='An_LactDay')px.scatter(
calculated_df_noNA,
x='An_LactDay', y='MP_requirement', hover_data = ['cow_id', 'date'],
color='An_LactDay')px.scatter(
calculated_df_noNA,
x='MP_requirement', y='ME_requirement') # get ME intakes
# calculated_df_noNA.info()
current_diets.info()<class 'pandas.core.frame.DataFrame'>
Index: 12 entries, 1658 to 16404
Data columns (total 27 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 sampleId 12 non-null object
1 reportDate 12 non-null datetime64[ns]
2 location 12 non-null object
3 Acid Detergent Fibre (%) 12 non-null float64
4 Ash (%) 12 non-null float64
5 Calcium (%) 12 non-null float64
6 Copper (ug/g) 12 non-null float64
7 Crude Fat (%) 12 non-null float64
8 Crude Protein (%) 12 non-null float64
9 Dry Matter (%) 12 non-null float64
10 Iron (ug/g) 12 non-null float64
11 Magnesium (%) 12 non-null float64
12 Manganese (ug/g) 12 non-null float64
13 Moisture (%) 12 non-null float64
14 NE Gain (MCal/Kg) 12 non-null float64
15 NE Lactation (MCal/Kg) 12 non-null float64
16 NE Maintenance (MCal/Kg) 12 non-null float64
17 NFC (%) 12 non-null float64
18 Neutral Detergent Fibre (%) 12 non-null float64
19 Phosphorus (%) 12 non-null float64
20 Potassium (%) 12 non-null float64
21 Sodium (%) 12 non-null float64
22 Starch (%) 12 non-null float64
23 Sulphur (%) 12 non-null float64
24 Total Digestible Nutrients (%) 12 non-null float64
25 Zinc (ug/g) 12 non-null float64
26 Diet_ID 12 non-null object
dtypes: datetime64[ns](1), float64(23), object(3)
memory usage: 2.6+ KB